﻿using Alma.Infrastructure;

namespace Alma.Models
{
    public class TemplateInfo : NotificationObject
    {
        public TemplateInfo() { }

        //public TemplateInfo(string fileName)
        //{
        //    Assembly assembly = Assembly.LoadFile(fileName);
        //    string xamlFile = string.Format("pack://application:,,,/{0};Component/Main.xaml", assembly.FullName);
        //    StreamResourceInfo sri = Application.GetResourceStream(new Uri(xamlFile, false));
        //}

        #region Fields
        private string title;
        private string guid;
        private string xamlContent;
        private byte[] preview;
        #endregion

        #region Properties
        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                RaisePropertyChanged(() => Title);
            }
        }

        public string Guid
        {
            get { return guid; }
            set
            {
                guid = value;
                RaisePropertyChanged(() => Guid);
            }
        }

        public string XamlContent
        {
            get { return xamlContent; }
            set
            {
                xamlContent = value;
                RaisePropertyChanged(() => XamlContent);
            }
        }

        public byte[] Preview
        {
            get { return preview; }
            set
            {
                preview = value;
                RaisePropertyChanged(() => Preview);
            }
        }
        #endregion
    }
}
